package org.dey.serviceImpl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.dey.mapper.CheckItemMapper;
import org.dey.pojo.CheckItem;
import org.dey.service.CheckItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author deyran
 * @date 2022/3/22 19:04
 * @classname 检查项
 * @see
 */
@Service
@Transactional
public class CheckItemServiceImpl extends ServiceImpl<CheckItemMapper, CheckItem> implements CheckItemService {

    @Autowired
    CheckItemMapper checkItemMapper;

    @Override
    public List<CheckItem> CheckItems(int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<CheckItem> checkItems = this.list();
        PageInfo<CheckItem> pageInfo = new PageInfo<>(checkItems);
        return pageInfo.getList();
    }

}
